from google.appengine.ext import db

class Artist(db.Model):
  name = db.StringProperty(required=True)
  uuid = db.StringProperty(required=True)
  created = db.DateTimeProperty(auto_now_add=True, required=True)
  
class Recording(db.Model):
  title = db.StringProperty(required=True)
  year = db.IntegerProperty()
  type = db.StringProperty()
  uuid = db.StringProperty(required=True)
  created = db.DateTimeProperty(auto_now_add=True, required=True)
  description = db.TextProperty()
  artist = db.ReferenceProperty(Artist)
  cover = db.BlobProperty()
